/*
 Navicat Premium Dump SQL

 Source Server         : @localhost
 Source Server Type    : MariaDB
 Source Server Version : 101106 (10.11.6-MariaDB-0+deb12u1)
 Source Host           : localhost:3306
 Source Schema         : petstore

 Target Server Type    : MariaDB
 Target Server Version : 101106 (10.11.6-MariaDB-0+deb12u1)
 File Encoding         : 65001

 Date: 15/07/2024 17:15:17
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for address
-- ----------------------------
DROP TABLE IF EXISTS `address`;
CREATE TABLE `address` (
  `addressId` int(11) NOT NULL AUTO_INCREMENT,
  `addressLine` varchar(255) DEFAULT NULL,
  `district` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `province` varchar(255) DEFAULT NULL,
  `contact` varchar(255) DEFAULT NULL,
  `userName` varchar(255) NOT NULL,
  `Name` varchar(255) DEFAULT NULL,
  `moRen` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`addressId`,`userName`,`moRen`) USING BTREE,
  KEY `userName` (`userName`),
  KEY `addressId` (`addressId`),
  CONSTRAINT `address_ibfk_1` FOREIGN KEY (`userName`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

-- ----------------------------
-- Records of address
-- ----------------------------
BEGIN;
INSERT INTO `address` (`addressId`, `addressLine`, `district`, `city`, `province`, `contact`, `userName`, `Name`, `moRen`) VALUES (1, '常太镇', '城厢区', '莆田市', '福建省', '17350858096', '1', '李鸿腾', 1);
INSERT INTO `address` (`addressId`, `addressLine`, `district`, `city`, `province`, `contact`, `userName`, `Name`, `moRen`) VALUES (2, '天马路', '集美区', '厦门市', '福建省', '1', 'lyf9484', 'lyf', 0);
INSERT INTO `address` (`addressId`, `addressLine`, `district`, `city`, `province`, `contact`, `userName`, `Name`, `moRen`) VALUES (3, '厦门理工', '集美区', '厦门市', '福建省', '11111111112', '1', 'lht', 0);
INSERT INTO `address` (`addressId`, `addressLine`, `district`, `city`, `province`, `contact`, `userName`, `Name`, `moRen`) VALUES (5, '翻斗花园11', '南郊区', '大同市', '山西省', '12222222222', '1', 'lyf1', 0);
INSERT INTO `address` (`addressId`, `addressLine`, `district`, `city`, `province`, `contact`, `userName`, `Name`, `moRen`) VALUES (6, '埭头镇', '秀屿区', '莆田市', '福建省', '19999999999', 'yifan2071', '林逸凡', 1);
COMMIT;

-- ----------------------------
-- Table structure for cart
-- ----------------------------
DROP TABLE IF EXISTS `cart`;
CREATE TABLE `cart` (
  `cartId` varchar(255) NOT NULL,
  `productName` varchar(255) DEFAULT NULL,
  `userName` varchar(255) NOT NULL,
  `supplierName` varchar(255) NOT NULL,
  `type` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL CHECK (json_valid(`type`)),
  `typeNames` varchar(255) DEFAULT NULL,
  `quantity` int(11) DEFAULT NULL,
  `price` int(11) DEFAULT NULL,
  `imageUrl` varchar(255) DEFAULT NULL,
  `productId` int(11) NOT NULL,
  `stock` int(11) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`cartId`,`productId`) USING BTREE,
  KEY `cart_ibfk_1` (`productName`),
  KEY `cart_ibfk_2` (`userName`),
  KEY `cart_ibfk_3` (`supplierName`),
  CONSTRAINT `cart_ibfk_1` FOREIGN KEY (`productName`) REFERENCES `product` (`productName`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `cart_ibfk_2` FOREIGN KEY (`userName`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `cart_ibfk_3` FOREIGN KEY (`supplierName`) REFERENCES `supplier` (`supplierName`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

-- ----------------------------
-- Records of cart
-- ----------------------------
BEGIN;
INSERT INTO `cart` (`cartId`, `productName`, `userName`, `supplierName`, `type`, `typeNames`, `quantity`, `price`, `imageUrl`, `productId`, `stock`, `description`) VALUES ('282d73ec-4303-40b8-bcda-0d22a459cc4f', '异国短毛猫', '1', 'sfy的宠物店', '12', '黑色 小', 1, 100, 'assets/products/ExoticShorthair.png', 5, 0, '喜欢玩耍，却又善于控制');
INSERT INTO `cart` (`cartId`, `productName`, `userName`, `supplierName`, `type`, `typeNames`, `quantity`, `price`, `imageUrl`, `productId`, `stock`, `description`) VALUES ('386d367a-1209-468b-a3af-1b8231dd3de5', '暹罗猫', '1', 'lyf的宠物店', '12', '黑色 中', 1, 110, 'assets/products/Siamese.png', 4, 0, '暹罗猫以刚烈好动而闻名');
INSERT INTO `cart` (`cartId`, `productName`, `userName`, `supplierName`, `type`, `typeNames`, `quantity`, `price`, `imageUrl`, `productId`, `stock`, `description`) VALUES ('4ed4ff75-7d7c-43e9-bc7e-59de63221970', '小猫', '1', 'sfy的宠物店', '12', '黑色 中', 1, 110, 'assets/products/2.png', 0, NULL, NULL);
INSERT INTO `cart` (`cartId`, `productName`, `userName`, `supplierName`, `type`, `typeNames`, `quantity`, `price`, `imageUrl`, `productId`, `stock`, `description`) VALUES ('76269755-f659-4809-92be-050d150cd09b', '暹罗猫', '1', 'lyf的宠物店', '12', '黑色 中', 1, 110, 'assets/products/Siamese.png', 4, 0, '暹罗猫以刚烈好动而闻名');
INSERT INTO `cart` (`cartId`, `productName`, `userName`, `supplierName`, `type`, `typeNames`, `quantity`, `price`, `imageUrl`, `productId`, `stock`, `description`) VALUES ('b1238b92-d0dc-49db-833d-a336579c39b7', '孟加拉豹猫', 'yifan2071', 'sfy的宠物店', '12', '公 纯种', 1, 600, 'assets/products/BengalLeopard.png', 3, NULL, NULL);
INSERT INTO `cart` (`cartId`, `productName`, `userName`, `supplierName`, `type`, `typeNames`, `quantity`, `price`, `imageUrl`, `productId`, `stock`, `description`) VALUES ('c6fbff23-0b4c-4a66-ad2b-a33fbcb46cfa', '孟加拉豹猫', 'yifan2071', 'sfy的宠物店', '12', '母 串种', 2, 550, 'assets/products/BengalLeopard.png', 3, NULL, NULL);
INSERT INTO `cart` (`cartId`, `productName`, `userName`, `supplierName`, `type`, `typeNames`, `quantity`, `price`, `imageUrl`, `productId`, `stock`, `description`) VALUES ('c7ee2ab2-bccc-46aa-a6b6-a671d3dda9bf', '异国短毛猫', 'yifan2071', 'sfy的宠物店', '12', '公 串种', 1, 600, 'assets/products/ExoticShorthair.png', 5, NULL, NULL);
INSERT INTO `cart` (`cartId`, `productName`, `userName`, `supplierName`, `type`, `typeNames`, `quantity`, `price`, `imageUrl`, `productId`, `stock`, `description`) VALUES ('fc3ed444-a758-4765-a6cc-e6ce7d5c2d88', '银渐层', 'yifan2071', 'sfy的宠物店', '12', '公 纯种', 1, 800, 'assets/products/SilverGradient.png', 6, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
  `categoryId` int(11) NOT NULL,
  `categoryName` varchar(255) DEFAULT NULL,
  `icon` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`categoryId`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of category
-- ----------------------------
BEGIN;
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (1, '英国短毛猫', 'assets/cat/shorthair.png', '英国短毛猫是一种温和、结实、肌肉发达的猫，毛短而浓密，性格温和，适合家庭生活。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (2, '波斯猫', 'assets/cat/bosi.png', '波斯猫以其长而浓密的被毛和娇柔的性格而闻名，有圆圆的脸和短而扁的鼻子。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (3, '暹罗猫', 'assets/cat/xianluo.png', '暹罗猫有著名的蓝眼睛和短毛，身体修长，性格活泼好动，喜欢与人互动。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (4, '布偶猫', 'assets/cat/buou.png', '布偶猫有浓密的长毛，身体大而结实，性格温顺，因为在抱起时会放松身体而得名。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (5, '豹猫', 'assets/cat/bao.png', '豹猫具有野性的外观和活泼好动的性格，毛色带有浓密的斑纹，富有魅力和独特性格。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (6, '金吉拉猫', 'assets/cat/jinjila.png', '金吉拉猫是体型庞大的猫种，有浓密的半长毛和耐寒的特点，性格友善、温和。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (7, '无毛猫', 'assets/cat/wumao.png', '无毛猫体毛非常稀疏或者几乎没有，皮肤有皱褶，需要特殊的护理，性格活泼、友好。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (8, '埃及猫', 'assets/cat/aiji.png', '埃及猫具有光滑的短毛和标志性的斑点，是一种非常古老的猫种，性格敏捷、警觉。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (9, '拉布拉多', 'assets/dog/labuladuo.png', '拉布拉多犬是一种温顺、友好且易训的狗，通常具有橙色、黑色或黄色的双层毛发。它们活泼、聪明，适合作为家庭宠物和工作犬。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (10, '德国牧羊犬', 'assets/dog/muyang.png', '德国牧羊犬是一种勤奋、聪明且忠诚的工作犬，常用于警务和救援任务。它们拥有强壮的体格和发达的智力，适合需要高级训练的任务。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (11, '法国斗牛犬', 'assets/dog/douniu.png', '法国斗牛犬是一种小型犬，具有宽大的耳朵和短平的鼻子。它们性格温和，适合在城市环境中生活，是优秀的家庭伴侣犬。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (12, '贵宾犬', 'assets/dog/guibing.png', '贵宾犬是一种智力高、优雅且易训的狗，通常有标准、迷你和玩具三个品种。它们的毛发丰富、不易掉落，适合需要定期美容的主人。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (13, '柯基犬', 'assets/dog/keji.png', '柯基犬是一种短腿、敏捷和聪明的牧羊犬。它们来自威尔士，有彩色斑点的被毛和令人愉悦的表情，是受欢迎的家庭宠物。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (14, '边境牧羊犬', 'assets/dog/bianjingmuyang.png', '边境牧羊犬是一种非常聪明、高度活跃的工作犬，通常用于牧羊和竞技犬的比赛。它们需要大量的体能和智力刺激，适合有经验的狗主人。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (15, '萨摩耶犬', 'assets/dog/samoye.png', '萨摩耶犬是一种美丽、友好且精力充沛的狗，具有浓密的白色双层被毛和迷人的笑容。它们喜欢与家人互动，并需要大量的锻炼和关注。');
INSERT INTO `category` (`categoryId`, `categoryName`, `icon`, `description`) VALUES (16, '吉娃娃', 'assets/dog/jiwawa.png', '吉娃娃是世界上最小的狗之一，具有大胆、独立和忠诚的性格。它们的被毛可以是短毛或长毛，适合在小空间中生活，但需要特别的社交化和训练。');
COMMIT;

-- ----------------------------
-- Table structure for message
-- ----------------------------
DROP TABLE IF EXISTS `message`;
CREATE TABLE `message` (
  `messageId` int(11) NOT NULL,
  `senderId` varchar(255) NOT NULL,
  `receiveId` varchar(255) NOT NULL,
  `content` text DEFAULT NULL,
  `sentTime` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`messageId`,`senderId`,`receiveId`) USING BTREE,
  KEY `message_ibfk_1` (`senderId`),
  KEY `receiveId` (`receiveId`),
  CONSTRAINT `message_ibfk_1` FOREIGN KEY (`senderId`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `message_ibfk_2` FOREIGN KEY (`receiveId`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

-- ----------------------------
-- Records of message
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for orders
-- ----------------------------
DROP TABLE IF EXISTS `orders`;
CREATE TABLE `orders` (
  `orderId` int(11) NOT NULL AUTO_INCREMENT,
  `userName` varchar(255) NOT NULL,
  `productId` int(11) NOT NULL,
  `amount` int(11) DEFAULT NULL,
  `total` decimal(10,2) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `createTime` timestamp NULL DEFAULT current_timestamp(),
  `updateTime` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `info` varchar(255) DEFAULT NULL,
  `addressId` int(11) NOT NULL,
  PRIMARY KEY (`orderId`,`productId`,`userName`,`addressId`) USING BTREE,
  KEY `orderId` (`orderId`) USING BTREE,
  KEY `userName` (`userName`) USING BTREE,
  KEY `productId` (`productId`) USING BTREE,
  CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`userName`) REFERENCES `user` (`username`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `orders_ibfk_2` FOREIGN KEY (`productId`) REFERENCES `product` (`productId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of orders
-- ----------------------------
BEGIN;
INSERT INTO `orders` (`orderId`, `userName`, `productId`, `amount`, `total`, `status`, `createTime`, `updateTime`, `info`, `addressId`) VALUES (6, '1', 7, 404, 1.00, '0', '2024-07-08 21:13:38', '2024-07-08 21:13:38', '公 纯种', 1);
INSERT INTO `orders` (`orderId`, `userName`, `productId`, `amount`, `total`, `status`, `createTime`, `updateTime`, `info`, `addressId`) VALUES (7, '1', 7, 300, 2.00, '1', '2024-07-08 21:13:54', '2024-07-09 13:17:16', '公 串种', 1);
INSERT INTO `orders` (`orderId`, `userName`, `productId`, `amount`, `total`, `status`, `createTime`, `updateTime`, `info`, `addressId`) VALUES (8, '1', 7, 598, 2.00, '2', '2024-07-08 21:15:47', '2024-07-09 12:16:23', '公 串种', 1);
INSERT INTO `orders` (`orderId`, `userName`, `productId`, `amount`, `total`, `status`, `createTime`, `updateTime`, `info`, `addressId`) VALUES (9, '1', 8, 99, 1.00, '3', '2024-07-09 08:33:28', '2024-07-09 08:50:08', '母 纯种', 1);
INSERT INTO `orders` (`orderId`, `userName`, `productId`, `amount`, `total`, `status`, `createTime`, `updateTime`, `info`, `addressId`) VALUES (10, '1', 2, 199, 1.00, '4', '2024-07-09 08:35:39', '2024-07-09 08:35:39', '母 纯种', 3);
INSERT INTO `orders` (`orderId`, `userName`, `productId`, `amount`, `total`, `status`, `createTime`, `updateTime`, `info`, `addressId`) VALUES (11, '1', 6, 700, 1.00, '4', '2024-07-09 08:36:31', '2024-07-09 08:37:57', '公 串种', 3);
INSERT INTO `orders` (`orderId`, `userName`, `productId`, `amount`, `total`, `status`, `createTime`, `updateTime`, `info`, `addressId`) VALUES (23, '1', 2, 598, 2.00, '0', '2024-07-09 12:14:28', '2024-07-09 12:14:28', '公 纯种', 1);
INSERT INTO `orders` (`orderId`, `userName`, `productId`, `amount`, `total`, `status`, `createTime`, `updateTime`, `info`, `addressId`) VALUES (24, '1', 8, 99, 1.00, '2', '2024-07-09 12:14:53', '2024-07-09 12:16:34', '公 串种', 1);
INSERT INTO `orders` (`orderId`, `userName`, `productId`, `amount`, `total`, `status`, `createTime`, `updateTime`, `info`, `addressId`) VALUES (25, '1', 4, 400, 1.00, '1', '2024-07-09 12:15:37', '2024-07-09 12:15:37', '公 串种', 1);
INSERT INTO `orders` (`orderId`, `userName`, `productId`, `amount`, `total`, `status`, `createTime`, `updateTime`, `info`, `addressId`) VALUES (26, '1', 4, 400, 1.00, '0', '2024-07-09 12:24:36', '2024-07-09 12:24:36', '公 串种', 1);
INSERT INTO `orders` (`orderId`, `userName`, `productId`, `amount`, `total`, `status`, `createTime`, `updateTime`, `info`, `addressId`) VALUES (27, '1', 8, 120, 1.00, '0', '2024-07-09 19:38:00', '2024-07-09 19:38:00', '黑色 大', 3);
COMMIT;

-- ----------------------------
-- Table structure for product
-- ----------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
  `productId` int(11) NOT NULL AUTO_INCREMENT,
  `productName` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `categoryId` int(11) NOT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `stock` int(11) DEFAULT NULL,
  `supplierId` int(11) NOT NULL,
  `imageUrl` varchar(255) DEFAULT NULL,
  `createTime` timestamp NULL DEFAULT current_timestamp(),
  `updateTime` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `videoUrl` varchar(255) DEFAULT NULL,
  `sold` int(11) DEFAULT 0,
  `type` int(11) DEFAULT 0 COMMENT '0为猫,1为狗，2为其他，3为周边',
  PRIMARY KEY (`productId`,`categoryId`,`supplierId`) USING BTREE,
  KEY `categoryId` (`categoryId`) USING BTREE,
  KEY `supplierId` (`supplierId`) USING BTREE,
  KEY `productId` (`productId`) USING BTREE,
  KEY `productName` (`productName`),
  CONSTRAINT `product_ibfk_1` FOREIGN KEY (`categoryId`) REFERENCES `category` (`categoryId`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `product_ibfk_2` FOREIGN KEY (`supplierId`) REFERENCES `supplier` (`supplierId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of product
-- ----------------------------
BEGIN;
INSERT INTO `product` (`productId`, `productName`, `description`, `categoryId`, `price`, `stock`, `supplierId`, `imageUrl`, `createTime`, `updateTime`, `videoUrl`, `sold`, `type`) VALUES (2, '小猫', '333', 1, 199.00, 2, 1003, 'assets/products/2.png', '2024-07-04 09:26:36', '2024-07-10 10:28:32', '1.mp4', 2, 0);
INSERT INTO `product` (`productId`, `productName`, `description`, `categoryId`, `price`, `stock`, `supplierId`, `imageUrl`, `createTime`, `updateTime`, `videoUrl`, `sold`, `type`) VALUES (3, '孟加拉豹猫', '温和而带有豹猫的野性美', 1, 500.00, 3, 1003, 'assets/products/BengalLeopard.png', '2024-07-06 16:38:50', '2024-07-10 10:28:40', '1.mp4', 3, 0);
INSERT INTO `product` (`productId`, `productName`, `description`, `categoryId`, `price`, `stock`, `supplierId`, `imageUrl`, `createTime`, `updateTime`, `videoUrl`, `sold`, `type`) VALUES (4, '暹罗猫', '暹罗猫以刚烈好动而闻名', 1, 400.00, 1, 1004, 'assets/products/Siamese.png', '2024-07-06 16:40:31', '2024-07-10 10:28:43', '1.mp4', 4, 0);
INSERT INTO `product` (`productId`, `productName`, `description`, `categoryId`, `price`, `stock`, `supplierId`, `imageUrl`, `createTime`, `updateTime`, `videoUrl`, `sold`, `type`) VALUES (5, '异国短毛猫', '喜欢玩耍，却又善于控制', 1, 600.00, 2, 1003, 'assets/products/ExoticShorthair.png', '2024-07-06 16:41:59', '2024-07-10 10:28:45', '1.mp4', 5, 0);
INSERT INTO `product` (`productId`, `productName`, `description`, `categoryId`, `price`, `stock`, `supplierId`, `imageUrl`, `createTime`, `updateTime`, `videoUrl`, `sold`, `type`) VALUES (6, '银渐层', '大胆好奇，但非常温柔', 1, 700.00, 1, 1003, 'assets/products/SilverGradient.png', '2024-07-06 16:43:52', '2024-07-10 10:28:47', '1.mp4', 6, 0);
INSERT INTO `product` (`productId`, `productName`, `description`, `categoryId`, `price`, `stock`, `supplierId`, `imageUrl`, `createTime`, `updateTime`, `videoUrl`, `sold`, `type`) VALUES (7, '黑猫警长', '机智勇敢的黑猫警长和它的警探伙伴痛歼搬仓鼠，空中擒获凶残的食猴鹰，抓住了偷吃红土的大象、河马、野猪，侦破了一个又一个案件，保卫了森林的安全。', 1, 299.00, 2, 1003, 'assets/products/1.png', '2024-07-07 21:23:22', '2024-07-10 10:28:51', '1.mp4', 5, 0);
INSERT INTO `product` (`productId`, `productName`, `description`, `categoryId`, `price`, `stock`, `supplierId`, `imageUrl`, `createTime`, `updateTime`, `videoUrl`, `sold`, `type`) VALUES (8, '哆啦A梦', '来自未来世界（22世纪）的蓝色猫型机器人（原本是黄色的），身上的四次元口袋装有许多工具，为避免大雄的命运走向悲惨而来。因为失去原生的耳朵，常被人以为是蓝色的狸猫而引起不满。害怕老鼠，喜欢吃铜锣烧。', 1, 99.00, 0, 1004, 'assets/products/bobi.png', '2024-07-09 08:47:51', '2024-07-10 10:28:55', '1.mp4', 0, 0);
COMMIT;

-- ----------------------------
-- Table structure for review
-- ----------------------------
DROP TABLE IF EXISTS `review`;
CREATE TABLE `review` (
  `reviewId` int(11) NOT NULL AUTO_INCREMENT,
  `productId` int(11) NOT NULL,
  `username` varchar(255) NOT NULL,
  `rating` int(11) DEFAULT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `createTime` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updateTime` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`reviewId`,`productId`,`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of review
-- ----------------------------
BEGIN;
INSERT INTO `review` (`reviewId`, `productId`, `username`, `rating`, `comment`, `createTime`, `updateTime`) VALUES (1, 7, '1', 5, '非常棒，他们家的猫咪我喜欢的不得了，以后还会再买。快递速度也很快，好评！！', '2024-07-07 21:24:00', '2024-07-07 21:24:00');
INSERT INTO `review` (`reviewId`, `productId`, `username`, `rating`, `comment`, `createTime`, `updateTime`) VALUES (2, 2, 'ysd380', 4, '牛牛牛', '2024-07-07 14:34:49', '2024-07-07 14:34:49');
INSERT INTO `review` (`reviewId`, `productId`, `username`, `rating`, `comment`, `createTime`, `updateTime`) VALUES (3, 7, 'ysd380', 4, '很好很好，猫咪很喜欢。', '2024-07-07 21:24:01', '2024-07-07 21:24:01');
INSERT INTO `review` (`reviewId`, `productId`, `username`, `rating`, `comment`, `createTime`, `updateTime`) VALUES (4, 7, 'jjj4179', 3, '牛牛牛', '2024-07-07 21:24:04', '2024-07-07 21:24:04');
COMMIT;

-- ----------------------------
-- Table structure for supplier
-- ----------------------------
DROP TABLE IF EXISTS `supplier`;
CREATE TABLE `supplier` (
  `supplierId` int(11) NOT NULL,
  `supplierName` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `lng` double(255,5) DEFAULT NULL,
  `lat` double(255,5) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `rate` double(255,1) DEFAULT NULL,
  PRIMARY KEY (`supplierId`) USING BTREE,
  KEY `supplierId` (`supplierId`) USING BTREE,
  KEY `addressId` (`address`) USING BTREE,
  KEY `supplierName` (`supplierName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of supplier
-- ----------------------------
BEGIN;
INSERT INTO `supplier` (`supplierId`, `supplierName`, `description`, `address`, `lng`, `lat`, `image`, `rate`) VALUES (1000, '快乐爪宠物店', '营业时间：8点-24点', '福建省厦门市湖里区禾山街道翠湖庄园', 118.13813, 24.52988, 'assets/shop/petHarbor.png', 4.0);
INSERT INTO `supplier` (`supplierId`, `supplierName`, `description`, `address`, `lng`, `lat`, `image`, `rate`) VALUES (1001, '完美宠物店', '营业时间：8点-24点', '福建省厦门市湖里区湖里街道华光路416号富豪花园', 118.11334, 24.51023, 'assets/shop/petHarbor.png', 5.0);
INSERT INTO `supplier` (`supplierId`, `supplierName`, `description`, `address`, `lng`, `lat`, `image`, `rate`) VALUES (1002, '毛茸茸的朋友', '营业时间：8点-24点', '福建省厦门市集美区后溪镇天马路746号', 118.09415, 24.62154, 'assets/shop/petHarbor.png', 3.0);
INSERT INTO `supplier` (`supplierId`, `supplierName`, `description`, `address`, `lng`, `lat`, `image`, `rate`) VALUES (1003, 'sfy的宠物店', '营业时间：8点-24点', '福建省厦门市集美区侨英街道纵三路', 118.11436, 24.58680, 'assets/shop/petHarbor.png', 4.0);
INSERT INTO `supplier` (`supplierId`, `supplierName`, `description`, `address`, `lng`, `lat`, `image`, `rate`) VALUES (1004, 'lyf的宠物店', '营业时间：8点-24点', '福建省厦门市湖里区湖里街道和宁里小城故事禹洲新城', 118.08680, 24.49488, 'assets/shop/petHarbor.png', 2.0);
INSERT INTO `supplier` (`supplierId`, `supplierName`, `description`, `address`, `lng`, `lat`, `image`, `rate`) VALUES (1005, 'wjj的宠物店', '营业时间：8点-24点', '福建省厦门市集美区侨英街道孙坂南路176号', 118.09180, 24.60802, 'assets/shop/petHarbor.png', 5.0);
INSERT INTO `supplier` (`supplierId`, `supplierName`, `description`, `address`, `lng`, `lat`, `image`, `rate`) VALUES (1006, 'qm的宠物店', '营业时间：8点-24点', '福建省厦门市思明区厦港街道民族路56号之1-4当代天境', 118.08373, 24.44365, 'assets/shop/petHarbor.png', 1.0);
INSERT INTO `supplier` (`supplierId`, `supplierName`, `description`, `address`, `lng`, `lat`, `image`, `rate`) VALUES (1007, 'lht的宠物店', '营业时间：8点-24点', '福建省厦门市思明区滨海街道黄厝路164号厦门半岛小镇海景客栈', 118.15831, 24.44354, 'assets/shop/petHarbor.png', 1.0);
INSERT INTO `supplier` (`supplierId`, `supplierName`, `description`, `address`, `lng`, `lat`, `image`, `rate`) VALUES (1008, 'mydog', '营业时间：8点-24点', '福建省厦门市集美区侨英街道美峰路', 118.12433, 24.59320, 'assets/shop/petHarbor.png', 5.0);
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `username` varchar(255) NOT NULL,
  `password` varchar(255) DEFAULT NULL,
  `userType` int(11) DEFAULT NULL,
  `enable` int(11) DEFAULT NULL,
  `token` varchar(255) DEFAULT NULL,
  `nickname` varchar(255) DEFAULT NULL,
  `introduction` varchar(255) DEFAULT NULL,
  `sex` varchar(255) DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('1', '202cb962ac59075b964b07152d234b70', 1, 1, NULL, 'test', '你好', '未知', 12);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('jjj4179', '202cb962ac59075b964b07152d234b70', 0, 1, NULL, 'jjj4179', NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('lyf9484', '8cec883c5dd4e50431300252f9edb64d', 0, 0, NULL, 'lyf9484', NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('sfy1769', '482c811da5d5b4bc6d497ffa98491e38', 1, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('sfy1858', '5749d6949e291099732c66289a023990', 0, 0, NULL, 'sfy1858', NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('sfy4177', '482c811da5d5b4bc6d497ffa98491e38', 1, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('sfy4895', '482c811da5d5b4bc6d497ffa98491e38', 1, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('sfy5390', '482c811da5d5b4bc6d497ffa98491e38', 1, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('sfy6012', '202cb962ac59075b964b07152d234b70', 4, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('sfy7974', '5749d6949e291099732c66289a023990', 1, 1, NULL, 'sfy7974', NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('wjj3607', 'c56d0e9a7ccec67b4ea131655038d604', 0, 1, NULL, 'wjj3607', NULL, NULL, 0);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('wjj5453', 'a6b173cd6259a3a3f8cb85b2190ca3d1', 0, 0, NULL, 'wjj5453', NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('xiaoming8096', '482c811da5d5b4bc6d497ffa98491e38', 1, 1, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('yifan2071', '38918738710f289354388e0d34e0dde5', 0, 1, NULL, 'yifan2071', NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('ysd2330', '202cb962ac59075b964b07152d234b70', 0, 1, NULL, 'ysd2330', NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('ysd380', '202cb962ac59075b964b07152d234b70', 0, 1, NULL, 'ysd380', NULL, NULL, NULL);
INSERT INTO `user` (`username`, `password`, `userType`, `enable`, `token`, `nickname`, `introduction`, `sex`, `age`) VALUES ('ysd8876', '202cb962ac59075b964b07152d234b70', 0, 1, NULL, 'ysd8876', NULL, NULL, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
